package com.fingard.dsp.bank.directConfig;

import com.fingard.xml.XElement;

public class ReceiptSet {
	
	public String act;
	public String org;
	public FtpSet ftpSet;
	public String receiptDownloadType;
	public String bankReceiptMainDir;
	
	public void fromXElement(XElement pXe) throws Exception{
		act = pXe.getSingleText("act");
		org = pXe.getSingleText("org");
		
		receiptDownloadType = pXe.getSingleText("receiptDownloadType");
		bankReceiptMainDir = pXe.getSingleText("bankReceiptMainDir");
		if("ftp".equalsIgnoreCase(receiptDownloadType) || "sftp".equalsIgnoreCase(receiptDownloadType)){
			XElement ftpXe = pXe.getSingleChild("ftpSet");
			if(ftpXe!=null){
				ftpSet = new FtpSet();
				ftpSet.fromXElement(ftpXe);
			}
		}
		
	}

}
